#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sstream>
#include <iostream>
#include <string>
#include <cstdlib>
#include "Graph.h"
#include <fstream>

Graph::Graph()
{
}

Graph::~Graph()
{
}

Graph::Graph(int taille, double p)
{
  srand(time(NULL));
  int i = addVertex();
  while (i < taille-1)
    {
      i = addVertex();
      for (int j=i-1; j>=0; j--)
	{
	  double r = rand()/(double)RAND_MAX;
	  if(r < p)
	    addEdge(j, i);
	}
    }
}

Graph::Graph(int_vect_vect vect)
{
  adgencyList = vect;
}

